import java.util.Scanner;
 
public class Lesson9 {
    public static void main(String[] args) {
        // 创建Scanner对象用于接收用户输入
        Scanner scanner = new Scanner(System.in);
        
        System.out.print("Enter initial velocity (v0), final velocity (v1), and time (t): ");
        double initialVelocity = scanner.nextDouble();
        double finalVelocity = scanner.nextDouble();
        double timeElapsed = scanner.nextDouble();
        
        // 计算平均加速度
        double velocityChange = finalVelocity - initialVelocity;
        double avgAcceleration = velocityChange / timeElapsed;
        
        // 输出结果（使用格式化字符串，保留4位小数）
        System.out.printf("The average acceleration is %.4f%n", avgAcceleration);
        
        // 关闭Scanner资源
        scanner.close();
    }
}